package com.iheima.reggie_take.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * Created with IntelliJ IDEA.
 * ClassName: Employee
 * Package: com.iheima.reggie_take.entity
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-01-16
 * Time: 14:45
 */

//员工实体类

@Data
public class Employee implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    private String username;

    private String name;

    private String password;

    private String phone;

    private String sex;

    //身份证号码
    private String idNumber;

    private Integer status;

    //@TableFiled 注解处理公共字段 的添加和修改 fill 是填充 后面是填充的策略
    @TableField(fill = FieldFill.INSERT) //插入时填充字段
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE) //插入和更新时填充字段
    private LocalDateTime updateTime;

    @TableField(fill = FieldFill.INSERT)//插入时填充字段
    private Long createUser;

    @TableField(fill = FieldFill.INSERT_UPDATE) //插入和更新时候填充字段
    private Long updateUser;

}
